<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">
	<f:view>
		<ui:composition template="/template/templatePadrao.xhtml">
			<ui:define name="body">
				<h:form>
					<h:outputText value="Agendas" styleClass="header"/><br /><br />
					<p:dataTable value="#{agendaManager.medicos}" var="m" rows="5" paginator="true">
						<p:column headerText="Nome">
							<h:outputText value="#{m.nome}" />
						</p:column>
						<p:column headerText="CRM">
							<h:outputText value="#{m.crm}" />
						</p:column>
						<p:column headerText="Ação">
							<p:commandButton value="Exbir Agenda" action="#{agendaManager.exibirAgendaMedico}" ajax="false">
								<f:setPropertyActionListener target="#{agendaManager.medico}" value="#{m}" />
							</p:commandButton>
							
						</p:column>
						
					</p:dataTable>
				</h:form>
			</ui:define>
		</ui:composition>
	</f:view>
</html>